//
//  ViewController.m
//  HelloWorld
//
//  Created by student on 13-12-5.
//  Copyright (c) 2013年 niit. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
    //创建一个UILabel对象
    UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(0, 400, 320, 50)];
    //设定label的文字内容
    label1.text=@"Hello XCode";
    //设定label的字体大小
    label1.font=[UIFont systemFontOfSize:24];
    //设定label的中心点位置
    //label1.center=CGPointMake(320/2, 480/2);
    //设定label的文字对齐方式
    label1.textAlignment=NSTextAlignmentCenter;
    
    //将label添加到当前试图
    [self.view addSubview:label1];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
